//
//  BaseEntity.m
//  Array_null
//
//  Created by JonyFang on 16/5/9.
//  Copyright © 2016年 JonyFang. All rights reserved.
//

#import "BaseEntity.h"

@implementation BaseEntity

+ (NSArray *)arrayOfEntitiesFromArray:(NSArray *)array
{
    NSError *error;
    NSArray *arrayOfEntities = [MTLJSONAdapter modelsOfClass:[self class]
                                               fromJSONArray:array
                                                       error:&error];
    if (error) {
        NSLog(@"Couldn't convert app infos JSON to ChoosyAppInfo models: %@", error);
        return nil;
    }

    return arrayOfEntities;
    
}

@end
